package com.colbby.datahouse.common.dao;

import java.sql.Connection;

import org.springframework.stereotype.Component;

import com.colbby.datahouse.db.DBAccesser;
import com.colbby.datahouse.entity.Member;
import com.colbby.datahouse.message.ConnectionUtils;

@Component
public class MemberDao {

	public Member findMember(String nick, String shopNick) {
		Connection conn = ConnectionUtils.getConnection();
		Member member = new Member();
		member.setNick(nick);
		member.setShopNick(shopNick);
		DBAccesser db = new DBAccesser(conn);
		return db.selectOne(Member.class, member);
	}
}
